//
//  NSString+ZZ.m
//  planning
//
//  Created by mac on 2019/7/30.
//  Copyright © 2019 mac. All rights reserved.
//

#import "NSString+ZZ.h"

@implementation NSString (ZZ)

+ (NSString *)getMinuteSecondWithSecond:(NSTimeInterval)time {
    
    int minute = (int)time / 60;
    
    int second = (int)time % 60;
    
    if (second > 9) { //2:10
        
        return [NSString stringWithFormat:@"%d:%d",minute,second];
        
    }
    
    //2:09
    
    return [NSString stringWithFormat:@"%d:0%d",minute,second];
    
}

@end
